package hu.uniobuda.nik.bsik2f;

import java.io.File;
import java.util.LinkedList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: Matusinka Roland
 * Date: 2013.03.02.
 * Time: 2:33
 */
public class Utility {

    public static final int SORT_BY_PATH = 0;
    public static final int SORT_BY_ARTIST = 1;
    //etc...

    public static List<File> iterateFiles(List<File> files, File root) {
        if (files == null)
            files = new LinkedList<File>();

        if (!root.isDirectory()) {
            files.add(root);
            return files;
        }

        for (File file : root.listFiles())
            iterateFiles(files, file);
        return files;
    }

    public static List<TagInfo> Sort(List<TagInfo> source, int key) {
        switch (key) {
            default:
            case 0:
                //TODO Sort by path
                break;
            case 1:
                //TODO Sort by artist
                break;
            //etc...
        }

        return null;
    }
}
